wasm-ld-path
authorLLVM Packaging Team <pkg-llvm-team@lists.alioth.debian.org>
Tue, 16 Dec 2025 11:47:30 +0000 (12:47 +0100)
committerSylvestre Ledru <sylvestre@debian.org>
Tue, 16 Dec 2025 11:47:30 +0000 (12:47 +0100)
===================================================================

Gbp-Pq: Topic wasm
Gbp-Pq: Name wasm-ld-path.diff

clang/lib/Driver/ToolChains/WebAssembly.cpp

index 5054868b5ff4dcf39af9bbcd020448f9eb15c5b9..bc69388fa72a8abdae27725ce1f3ca2fadd9d0a2 100644 (file)
 #include "llvm/Support/Path.h"
 #include "llvm/Support/VirtualFileSystem.h"
 
+#include "llvm/Config/llvm-config.h" // for LLVM_VERSION_MAJOR
+
+#define TOSTR2(X) #X
+#define TOSTR(X) TOSTR2(X)
+
 using namespace clang::driver;
 using namespace clang::driver::tools;
 using namespace clang::driver::toolchains;
@@ -270,7 +275,7 @@ WebAssembly::WebAssembly(const Driver &D, const llvm::Triple &Triple,
 const char *WebAssembly::getDefaultLinker() const {
   if (TargetBuildsComponents(getTriple()))
     return "wasm-component-ld";
-  return "wasm-ld";
+  return "wasm-ld-" TOSTR(LLVM_VERSION_MAJOR);
 }
 
 bool WebAssembly::IsMathErrnoDefault() const { return false; }